const state = {
  //存放的键值对就是所要管理的状态
  name: "hellomodules",
  count: 1
};

const mutations = {
  ADD_COUNT: (state, num) => {
    state.count = state.count + num;
  }
};

const actions = {
  addCount({ commit }, num) {
    commit("ADD_COUNT", num);
  }
};

export default {
  namespaced: true,
  state,
  mutations,
  actions
};
